<template>
  <div id="box">
    <div class="my_order">
      <van-cell title="我的订单" is-link value="全部订单" to="/allOrd">
      </van-cell>

      <div class="play">
        <div v-for="(item, index) in list" :key="index" @click="DING_DAN">
          <div class="child">
            <img :src="item.img" alt="" />
          </div>
          <div class="com">{{ item.content }}</div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import { mapMutations } from "vuex";
export default {
  data() {
    return {
      list: [
        {
          img: require("@/assets/My_img/资源 3.png"),
          content: "代付款",
        },
        {
          img: require("@/assets/My_img/资源 1.png"), //require()
          content: "未付款",
        },
        {
          img: require("@/assets/My_img/资源 4.png"), //require()
          content: "已付款",
        },
      ],
    };
  },

  methods: {
    ...mapMutations("xin", ["DING_DAN"]),
  },
};
</script>

<style lang="scss" scoped>
/* scoped 让样式只在当前组件生效  ！important(父子元素存在同样类名时用)*/
#box {
  .my_order {
    width: 6.87rem;
    height: 2.61rem;
    line-height: 0.2rem;
    border-radius: 0.14rem;
    margin: 0.2rem 0.29rem 0 0.32rem;
    background-color: rgba(255, 255, 255, 100);
    text-align: center;
    .van-cell {
      border-radius: 0.14rem 0.14rem 5px 5px;
    }
    .van-cell__title {
      text-align: left;
    }
  }
  .play {
    margin-top: 0.2rem;
    display: flex;
    justify-content: space-around;
    .child {
      img {
        width: 0.73rem;
        height: 0.77rem;
      }
    }
    .com {
      font-size: 0.3rem;
      font-weight: 600;
      font-family: PingFang SC;
      color: #333333;
      line-height: 0.8rem;
    }
  }
}
</style>
